Fix the IntroTilePanel to use Docusaurus for link path resolution#10
Merged
ben-harris-5 merged 1 commit intomainfrom Dec 30, 2025
Merged
Fix the IntroTilePanel to use Docusaurus for link path resolution#10ben-harris-5 merged 1 commit intomainfrom
ben-harris-5 merged 1 commit intomainfrom
Conversation
ben-harris-5
commented
Dec 29, 2025
| .env.development.local | ||
| .env.test.local | ||
| .env.production.local | ||
| .idea |
Member
Author
There was a problem hiding this comment.
IntelliJ added some local files, we shouldn't commit them lol
ben-harris-5
commented
Dec 29, 2025
| # Games on Reddit | ||
|
|
||
| Unleash your creativity and build engaging games inside Reddit communities with Devvit’s powerful platform. [Earn money](../earn-money/reddit_developer_funds) as players engage with your games. | ||
| Unleash your creativity and build engaging games inside Reddit communities with Devvit’s powerful platform. [Earn money](../earn-money/reddit_developer_funds.md) as players engage with your games. |
Member
Author
There was a problem hiding this comment.
There will be a biiiiig PR coming separately to fix links like this across the entire repo.
ben-harris-5
commented
Dec 29, 2025
Comment on lines
36
to
+48
| title: 'Showcase', | ||
| image: Celebration, | ||
| href: '../examples/app-showcase', | ||
| background: 'linear-gradient(135deg, #ffe066 0%, #ff7c53 100%)', | ||
| textColor: '#5a2a00', | ||
| imageSide: 'right', | ||
| textAlign: 'left', | ||
| alt: 'Showcase', | ||
| }, | ||
| ]} | ||
| /> | ||
| > | ||
| [Quickstart](../quickstart/quickstart.md) | ||
| [Showcase](../examples/app-showcase.mdx) | ||
| </IntroTilePanel> |
Member
Author
There was a problem hiding this comment.
This is the highlight of how this works now. Rather than an href property, it finds the link in the body with a matching title, and uses the href of that link. This allows Docusaurus to translate this from a relative path to a markdown file, to the correct, absolute path instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💸 TL;DR
The intro buttons on
https://developers.reddit.com/docsdon't work, but they do work if you go tohttps://developers.reddit.com/docs/. Additionally, all the versioned docs links (likehttps://developers.reddit.com/docs/next) point you back at the unversioned version of whatever doc they link to.This is because Docusaurus does some fancy link replacement logic in
.md[x]files when you put in a link to another.md[x]file. We'd like to utilize that functionality in these buttons too! So, to get that, we have the calling code put a[markdown link](./other-file.md)in the body of theIntroTilePanelcomponent for each tile. Docusaurus will do its magic on those links at compile time, and then our code reads the href of those children to construct its own fancier links.🧪 Testing Steps / Validation
Local
yarn build && yarn servehas these links work properly now, both in the versioned and unversioned folders.